// extract module
var fs = require('fs');

// declare variables
var data = 'Hello World..!';

// use module
fs.writeFile('writeFile.txt', data, 'utf8', function(error) {
  console.log('WRITE FILE ASYNC COMPLETE');
});

fs.writeFileSync('writeFileSync.txt', data, 'utf8');
console.log('WRITE FILE SYNC COMPLETE');